This disclosure relates to image processing, and more particularly, to reticle removal.
Reticles may be used to measure scale and/or location in microscope, telescope, and other imaging systems. For example, a reticle may be used to mark how tall an image object is. The reticles may be black or white for high contrast. However, reticles can interfere with digital image processing algorithms. Effects such as halos and ringing are not uncommon around the reticles and they can also skew the histogram, which is used in many contrast enhancement algorithms. Additionally, some imaging systems impose the reticles on the image or video before digitization, which means the reticles may not always reside in exactly the same pixel location in the resulting digital image.
Inpainting is a process that has been used to fill in missing or damaged portions of an image. Inpainting has also been used to restore and conserve art. The idea is to use undamaged portions of the image closest and/or most similar to the missing regions to “inpaint” the missing/damaged regions. For digital images, the inpainting process begins with identifying the areas to be inpainted with a “mask image.” The mask image is a binary image with ones in the locations that the algorithm will consider to be missing and zeros elsewhere. The mask image is passed to the algorithm with the original image for inpainting.
Inpainting may be used for reticle removal since, as mentioned, the location of the reticles may vary from frame to frame, but within a certain number of pixels. As such, a mask image may be identified a priori that covers the range over which the reticles can vary. Then inpainting can fill in the image area under the reticles.
The simplest methods to perform inpainting include nearest neighbor approaches or two-dimensional (2D) filtering. These approaches have low complexity, but can cause excessive blurring or other objectionable artifacts. Other prior methods that are more complex achieve good results, but can take many minutes to process a single frame. Obviously, this is unacceptable for a real-time video system where, for a thirty frame per second (30 fps) video stream, each frame must be processed within tens of milliseconds. Such inpainting methods are typically exemplar-based, which sample and copy color values from undamaged regions of the image, or patch-based, which copy whole patches of pixels from other portions of the image.
Many prior methods, such as exemplar-based inpainting, perform “pixel priority” calculations to determine the optimal order of pixels to be inpainted. Inpainting pixels in a certain order can achieve visually impressive results, but this kind of logic makes a high-degree of parallelization difficult. Again, this makes real-time implementations difficult. Some other methods require a priori depth/disparity information to be provided about the image, which may be impractical for many real-world applications. Further, other inpainting methods depend on the solution of differential equations, which may be cumbersome and computationally expensive.
Last, many of these complex inpainting methods can produce unpredictable results. That is, inconsistent edges or physically impossible objects are not uncommon products of some of these algorithms. Unpredictable results are unacceptable for a real-time imaging system.
There is a need for reticle removal system and method that is fast and efficient. There is further a need for a reticle removal system and method that uses inpainting and that produces more predictable results.